﻿CREATE TABLE [dbo].[order_deal_details] (
    [ID]        INT             IDENTITY (1, 1) NOT NULL,
    [OID]       INT             NOT NULL,
    [ProductID] INT             NOT NULL,
    [Quantity]  DECIMAL (18, 5) NOT NULL,
    [UnitPrice] DECIMAL (18, 5) NOT NULL,
    CONSTRAINT [PK_order_deal_details_ID] PRIMARY KEY CLUSTERED ([ID] ASC),
    CONSTRAINT [FK_order_deal_details_order_deal] FOREIGN KEY ([OID]) REFERENCES [dbo].[order_deal] ([ID]) ON DELETE CASCADE,
    CONSTRAINT [FK_order_deal_details_products] FOREIGN KEY ([ProductID]) REFERENCES [dbo].[products] ([ID])
);



